package com.ruoyi.infoprojectplan.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.infoprojectplan.mapper.InfoProjectPlanMapper;
import com.ruoyi.infoprojectplan.domain.InfoProjectPlan;
import com.ruoyi.infoprojectplan.service.IInfoProjectPlanService;

/**
 * 项目汇总Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-08-01
 */
@Service
public class InfoProjectPlanServiceImpl implements IInfoProjectPlanService 
{
    @Autowired
    private InfoProjectPlanMapper infoProjectPlanMapper;

    /**
     * 查询项目汇总
     * 
     * @param id 项目汇总主键
     * @return 项目汇总
     */
    @Override
    public InfoProjectPlan selectInfoProjectPlanById(Long id)
    {
        return infoProjectPlanMapper.selectInfoProjectPlanById(id);
    }

    /**
     * 查询项目汇总列表
     * 
     * @param infoProjectPlan 项目汇总
     * @return 项目汇总
     */
    @Override
    public List<InfoProjectPlan> selectInfoProjectPlanList(InfoProjectPlan infoProjectPlan)
    {
        return infoProjectPlanMapper.selectInfoProjectPlanList(infoProjectPlan);
    }

    /**
     * 新增项目汇总
     * 
     * @param infoProjectPlan 项目汇总
     * @return 结果
     */
    @Override
    public int insertInfoProjectPlan(InfoProjectPlan infoProjectPlan)
    {
        infoProjectPlan.setCreateTime(DateUtils.getNowDate());
        return infoProjectPlanMapper.insertInfoProjectPlan(infoProjectPlan);
    }

    /**
     * 修改项目汇总
     * 
     * @param infoProjectPlan 项目汇总
     * @return 结果
     */
    @Override
    public int updateInfoProjectPlan(InfoProjectPlan infoProjectPlan)
    {
        infoProjectPlan.setUpdateTime(DateUtils.getNowDate());
        return infoProjectPlanMapper.updateInfoProjectPlan(infoProjectPlan);
    }

    /**
     * 批量删除项目汇总
     * 
     * @param ids 需要删除的项目汇总主键
     * @return 结果
     */
    @Override
    public int deleteInfoProjectPlanByIds(Long[] ids)
    {
        return infoProjectPlanMapper.deleteInfoProjectPlanByIds(ids);
    }

    /**
     * 删除项目汇总信息
     * 
     * @param id 项目汇总主键
     * @return 结果
     */
    @Override
    public int deleteInfoProjectPlanById(Long id)
    {
        return infoProjectPlanMapper.deleteInfoProjectPlanById(id);
    }
}
